package org.openmore.opc.dto.api;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openmore.opc.annotation.ReferencedField;
import org.openmore.opc.entity.Permission;

import java.util.Date;


@ApiModel("角色权限Dto")
public class RolePermissionDto {
    @ApiModelProperty(value = "父级权限id")
    public String roleId;
    @ApiModelProperty(value = "权限id")
    public String permissionId;
    @ReferencedField(refClass = Permission.class, localField = "permissionId", conditionalField = "id", selectField = "name")
    @ApiModelProperty(value = "权限名")
    public String permissionName;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public Date createdTime;

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(String permissionId) {
        this.permissionId = permissionId;
    }

    public String getPermissionName() {
        return permissionName;
    }

    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }
}